<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%mobile_adspace}}".
 *
 * @property string $id
 * @property integer $ad_network_id
 * @property integer $media_id
 * @property string $format_list
 * @property string $ad_network_adspace_id
 * @property string $name
 * @property string $base_price
 * @property string $deal_id
 * @property string $width
 * @property string $height
 * @property string $ext_size
 * @property integer $position
 * @property integer $type
 * @property integer $size_form
 * @property integer $container
 * @property string $category_id
 * @property integer $app_category
 * @property string $adspace_page_url
 * @property integer $status
 * @property string $last_update
 */
class MobileAdspace extends \app\models\BaseAR
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%mobile_adspace}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['ad_network_id', 'format_list', 'base_price', 'width', 'height'], 'required'],
            [['ad_network_id', 'media_id', 'deal_id', 'width', 'height', 'position', 'type', 'size_form', 'container', 'category_id', 'app_category', 'status'], 'integer'],
            [['ext_size', 'adspace_page_url'], 'string'],
            [['last_update'], 'safe'],
            [['format_list'], 'string', 'max' => 20],
            [['ad_network_adspace_id', 'name'], 'string', 'max' => 64],
            [['base_price'], 'string', 'max' => 32]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'ad_network_id' => 'Ad Network ID',
            'media_id' => 'Media ID',
            'format_list' => 'Format List',
            'ad_network_adspace_id' => 'Ad Network Adspace ID',
            'name' => 'Name',
            'base_price' => 'Base Price',
            'deal_id' => 'Deal ID',
            'width' => 'Width',
            'height' => 'Height',
            'ext_size' => 'Ext Size',
            'position' => 'Position',
            'type' => 'Type',
            'size_form' => 'Size Form',
            'container' => 'Container',
            'category_id' => 'Category ID',
            'app_category' => 'App Category',
            'adspace_page_url' => 'Adspace Page Url',
            'status' => 'Status',
            'last_update' => 'Last Update',
        ];
    }
}
